package com.diankangwo.factory.controller;

import com.diankangwo.common.annotation.SysLog;
import com.diankangwo.common.utils.R;
import com.diankangwo.factory.dao.TdExpressCodeMapper;
import com.diankangwo.factory.entity.TdExpressCode;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 物流接口
 */
@RestController
@RequestMapping("/fac/express")
public class ExpressCodeController {

    @Autowired
    private TdExpressCodeMapper tdExpressCodeMapper;

    /**
     * 获取物流公司信息
     */
    @ApiOperation(value = "获取物流公司信息", notes = "")
    @SysLog("获取物流公司信息")
    @RequestMapping(value = "/find", method = RequestMethod.POST)
    @RequiresPermissions("fac:express:find")
    public R save() {
        List<TdExpressCode> tdExpressCodeList = tdExpressCodeMapper.queryList();
        return R.ok().put("tdExpressCodeList",tdExpressCodeList);
    }

}
